﻿@using NewLife.Model;
@using NewLife.CMX;
@{
    var cat = Model as ICategory;
    var model = cat.Model;
}
<li>
    @if (cat.Childs.Count == 0)
    {
        <a href="~/CMS/Info/Cat/@cat.ID" target="main">
            <i class="menu-icon fa fa-caret-right"></i>
            @cat.Name
        </a>
    }
    else
    {
        <a href="#" class="dropdown-toggle">
            <i class="menu-icon fa fa-caret-right"></i>
            @cat.Name
        </a>
        <b class="arrow"></b>
        <ul class="submenu">
            @foreach (ICategory cat2 in cat.Childs)
            {
                @Html.Partial("_Left_Category", cat2);
            }
        </ul>
    }
</li>